import type { BasicPageParams, BasicFetchResult } from './baseModel';

export interface PinRecord {
  id: number | string;
  title: string;
  time: string;
  like: number;
  collect: number;
  replay: number;
  view: number;
  read: number;
}

export interface CollectionsRecord {
  id: number ;
  name: string;
  desc: string;
  state: number;
}

export type PinListParams = BasicPageParams & {
  status?: number;
};

export type PinListGetResultModel = BasicFetchResult<PinRecord>;

// 数据概览

type CardDataType =
  | 'all_article'
  | 'all_article_display'
  | 'all_article_view'
  | 'all_article_digg'
  | 'all_article_comment'
  | 'all_article_collect'
  | 'all_follower'
  | 'all_short_msg'
  | 'all_short_msg_digg'
  | 'all_short_msg_comment'
  | 'incr_active_follower'
  | 'incr_do_follower'
  | 'incr_undo_follower'
  | 'incr_follower';

export interface CardDataParams {
  datas: CardDataType[];
}

interface CardDataRecord {
  cnt: number;
  than_before: number;
}

export type CardDataGetResultModel = {
  [K in CardDataType]?: CardDataRecord;
};
